3.19.7 \(\int \frac {1}{(a+b x)^2 (a c+(b c+a d) x+b d x^2)} \, dx\) [1807]

Optimal. Leaf size=82 \[ -\frac {1}{2 (b c-a d) (a+b x)^2}+\frac {d}{(b c-a d)^2 (a+b x)}+\frac {d^2 \log (a+b x)}{(b c-a d)^3}-\frac {d^2 \log (c+d x)}{(b c-a d)^3} \]

[Out]

-1/2/(-a*d+b*c)/(b*x+a)^2+d/(-a*d+b*c)^2/(b*x+a)+d^2*ln(b*x+a)/(-a*d+b*c)^3-d^2*ln(d*x+c)/(-a*d+b*c)^3

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {640, 46} \begin {gather*} \frac {d^2 \log (a+b x)}{(b c-a d)^3}-\frac {d^2 \log (c+d x)}{(b c-a d)^3}+\frac {d}{(a+b x) (b c-a d)^2}-\frac {1}{2 (a+b x)^2 (b c-a d)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/((a + b*x)^2*(a*c + (b*c + a*d)*x + b*d*x^2)),x]

[Out]

-1/2*1/((b*c - a*d)*(a + b*x)^2) + d/((b*c - a*d)^2*(a + b*x)) + (d^2*Log[a + b*x])/(b*c - a*d)^3 - (d^2*Log[c
 + d*x])/(b*c - a*d)^3

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 640

Int[((d_) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a
/d + (c/e)*x)^p, x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - b*d*e + a*e^2, 0] &&
 IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {1}{(a+b x)^2 \left (a c+(b c+a d) x+b d x^2\right )} \, dx &=\int \frac {1}{(a+b x)^3 (c+d x)} \, dx\\ &=\int \left (\frac {b}{(b c-a d) (a+b x)^3}-\frac {b d}{(b c-a d)^2 (a+b x)^2}+\frac {b d^2}{(b c-a d)^3 (a+b x)}-\frac {d^3}{(b c-a d)^3 (c+d x)}\right ) \, dx\\ &=-\frac {1}{2 (b c-a d) (a+b x)^2}+\frac {d}{(b c-a d)^2 (a+b x)}+\frac {d^2 \log (a+b x)}{(b c-a d)^3}-\frac {d^2 \log (c+d x)}{(b c-a d)^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 67, normalized size = 0.82 \begin {gather*} \frac {\frac {(b c-a d) (-b c+3 a d+2 b d x)}{(a+b x)^2}+2 d^2 \log (a+b x)-2 d^2 \log (c+d x)}{2 (b c-a d)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/((a + b*x)^2*(a*c + (b*c + a*d)*x + b*d*x^2)),x]

[Out]

(((b*c - a*d)*(-(b*c) + 3*a*d + 2*b*d*x))/(a + b*x)^2 + 2*d^2*Log[a + b*x] - 2*d^2*Log[c + d*x])/(2*(b*c - a*d
)^3)

________________________________________________________________________________________

Maple [A]
time = 0.72, size = 81, normalized size = 0.99

method result size
default \(\frac {d^{2} \ln \left (d x +c \right )}{\left (a d -b c \right )^{3}}+\frac {1}{2 \left (a d -b c \right ) \left (b x +a \right )^{2}}+\frac {d}{\left (a d -b c \right )^{2} \left (b x +a \right )}-\frac {d^{2} \ln \left (b x +a \right )}{\left (a d -b c \right )^{3}}\) \(81\)
risch \(\frac {\frac {b d x}{a^{2} d^{2}-2 a b c d +b^{2} c^{2}}+\frac {3 a d -b c}{2 a^{2} d^{2}-4 a b c d +2 b^{2} c^{2}}}{\left (b x +a \right )^{2}}-\frac {d^{2} \ln \left (b x +a \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}+\frac {d^{2} \ln \left (-d x -c \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}\) \(172\)
norman \(\frac {\frac {b d x}{a^{2} d^{2}-2 a b c d +b^{2} c^{2}}+\frac {3 a \,b^{2} d -b^{3} c}{2 b^{2} \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}}{\left (b x +a \right )^{2}}+\frac {d^{2} \ln \left (d x +c \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}-\frac {d^{2} \ln \left (b x +a \right )}{a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}}\) \(177\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*x+a)^2/(a*c+(a*d+b*c)*x+b*d*x^2),x,method=_RETURNVERBOSE)

[Out]

d^2/(a*d-b*c)^3*ln(d*x+c)+1/2/(a*d-b*c)/(b*x+a)^2+d/(a*d-b*c)^2/(b*x+a)-d^2/(a*d-b*c)^3*ln(b*x+a)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (80) = 160\).
time = 0.28, size = 202, normalized size = 2.46 \begin {gather*} \frac {d^{2} \log \left (b x + a\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} - \frac {d^{2} \log \left (d x + c\right )}{b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}} + \frac {2 \, b d x - b c + 3 \, a d}{2 \, {\left (a^{2} b^{2} c^{2} - 2 \, a^{3} b c d + a^{4} d^{2} + {\left (b^{4} c^{2} - 2 \, a b^{3} c d + a^{2} b^{2} d^{2}\right )} x^{2} + 2 \, {\left (a b^{3} c^{2} - 2 \, a^{2} b^{2} c d + a^{3} b d^{2}\right )} x\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x+a)^2/(a*c+(a*d+b*c)*x+b*d*x^2),x, algorithm="maxima")

[Out]

d^2*log(b*x + a)/(b^3*c^3 - 3*a*b^2*c^2*d + 3*a^2*b*c*d^2 - a^3*d^3) - d^2*log(d*x + c)/(b^3*c^3 - 3*a*b^2*c^2
*d + 3*a^2*b*c*d^2 - a^3*d^3) + 1/2*(2*b*d*x - b*c + 3*a*d)/(a^2*b^2*c^2 - 2*a^3*b*c*d + a^4*d^2 + (b^4*c^2 -
2*a*b^3*c*d + a^2*b^2*d^2)*x^2 + 2*(a*b^3*c^2 - 2*a^2*b^2*c*d + a^3*b*d^2)*x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 242 vs. \(2 (80) = 160\).
time = 2.22, size = 242, normalized size = 2.95 \begin {gather*} -\frac {b^{2} c^{2} - 4 \, a b c d + 3 \, a^{2} d^{2} - 2 \, {\left (b^{2} c d - a b d^{2}\right )} x - 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, a b d^{2} x + a^{2} d^{2}\right )} \log \left (b x + a\right ) + 2 \, {\left (b^{2} d^{2} x^{2} + 2 \, a b d^{2} x + a^{2} d^{2}\right )} \log \left (d x + c\right )}{2 \, {\left (a^{2} b^{3} c^{3} - 3 \, a^{3} b^{2} c^{2} d + 3 \, a^{4} b c d^{2} - a^{5} d^{3} + {\left (b^{5} c^{3} - 3 \, a b^{4} c^{2} d + 3 \, a^{2} b^{3} c d^{2} - a^{3} b^{2} d^{3}\right )} x^{2} + 2 \, {\left (a b^{4} c^{3} - 3 \, a^{2} b^{3} c^{2} d + 3 \, a^{3} b^{2} c d^{2} - a^{4} b d^{3}\right )} x\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x+a)^2/(a*c+(a*d+b*c)*x+b*d*x^2),x, algorithm="fricas")

[Out]

-1/2*(b^2*c^2 - 4*a*b*c*d + 3*a^2*d^2 - 2*(b^2*c*d - a*b*d^2)*x - 2*(b^2*d^2*x^2 + 2*a*b*d^2*x + a^2*d^2)*log(
b*x + a) + 2*(b^2*d^2*x^2 + 2*a*b*d^2*x + a^2*d^2)*log(d*x + c))/(a^2*b^3*c^3 - 3*a^3*b^2*c^2*d + 3*a^4*b*c*d^
2 - a^5*d^3 + (b^5*c^3 - 3*a*b^4*c^2*d + 3*a^2*b^3*c*d^2 - a^3*b^2*d^3)*x^2 + 2*(a*b^4*c^3 - 3*a^2*b^3*c^2*d +
 3*a^3*b^2*c*d^2 - a^4*b*d^3)*x)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 381 vs. \(2 (68) = 136\).
time = 0.59, size = 381, normalized size = 4.65 \begin {gather*} \frac {d^{2} \log {\left (x + \frac {- \frac {a^{4} d^{6}}{\left (a d - b c\right )^{3}} + \frac {4 a^{3} b c d^{5}}{\left (a d - b c\right )^{3}} - \frac {6 a^{2} b^{2} c^{2} d^{4}}{\left (a d - b c\right )^{3}} + \frac {4 a b^{3} c^{3} d^{3}}{\left (a d - b c\right )^{3}} + a d^{3} - \frac {b^{4} c^{4} d^{2}}{\left (a d - b c\right )^{3}} + b c d^{2}}{2 b d^{3}} \right )}}{\left (a d - b c\right )^{3}} - \frac {d^{2} \log {\left (x + \frac {\frac {a^{4} d^{6}}{\left (a d - b c\right )^{3}} - \frac {4 a^{3} b c d^{5}}{\left (a d - b c\right )^{3}} + \frac {6 a^{2} b^{2} c^{2} d^{4}}{\left (a d - b c\right )^{3}} - \frac {4 a b^{3} c^{3} d^{3}}{\left (a d - b c\right )^{3}} + a d^{3} + \frac {b^{4} c^{4} d^{2}}{\left (a d - b c\right )^{3}} + b c d^{2}}{2 b d^{3}} \right )}}{\left (a d - b c\right )^{3}} + \frac {3 a d - b c + 2 b d x}{2 a^{4} d^{2} - 4 a^{3} b c d + 2 a^{2} b^{2} c^{2} + x^{2} \cdot \left (2 a^{2} b^{2} d^{2} - 4 a b^{3} c d + 2 b^{4} c^{2}\right ) + x \left (4 a^{3} b d^{2} - 8 a^{2} b^{2} c d + 4 a b^{3} c^{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x+a)**2/(a*c+(a*d+b*c)*x+b*d*x**2),x)

[Out]

d**2*log(x + (-a**4*d**6/(a*d - b*c)**3 + 4*a**3*b*c*d**5/(a*d - b*c)**3 - 6*a**2*b**2*c**2*d**4/(a*d - b*c)**
3 + 4*a*b**3*c**3*d**3/(a*d - b*c)**3 + a*d**3 - b**4*c**4*d**2/(a*d - b*c)**3 + b*c*d**2)/(2*b*d**3))/(a*d -
b*c)**3 - d**2*log(x + (a**4*d**6/(a*d - b*c)**3 - 4*a**3*b*c*d**5/(a*d - b*c)**3 + 6*a**2*b**2*c**2*d**4/(a*d
 - b*c)**3 - 4*a*b**3*c**3*d**3/(a*d - b*c)**3 + a*d**3 + b**4*c**4*d**2/(a*d - b*c)**3 + b*c*d**2)/(2*b*d**3)
)/(a*d - b*c)**3 + (3*a*d - b*c + 2*b*d*x)/(2*a**4*d**2 - 4*a**3*b*c*d + 2*a**2*b**2*c**2 + x**2*(2*a**2*b**2*
d**2 - 4*a*b**3*c*d + 2*b**4*c**2) + x*(4*a**3*b*d**2 - 8*a**2*b**2*c*d + 4*a*b**3*c**2))

________________________________________________________________________________________

Giac [A]
time = 0.95, size = 145, normalized size = 1.77 \begin {gather*} -\frac {b d^{2} \log \left ({\left | -\frac {b c}{b x + a} + \frac {a d}{b x + a} - d \right |}\right )}{b^{4} c^{3} - 3 \, a b^{3} c^{2} d + 3 \, a^{2} b^{2} c d^{2} - a^{3} b d^{3}} - \frac {\frac {b^{3} c}{{\left (b x + a\right )}^{2}} - \frac {2 \, b^{2} d}{b x + a} - \frac {a b^{2} d}{{\left (b x + a\right )}^{2}}}{2 \, {\left (b^{4} c^{2} - 2 \, a b^{3} c d + a^{2} b^{2} d^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(b*x+a)^2/(a*c+(a*d+b*c)*x+b*d*x^2),x, algorithm="giac")

[Out]

-b*d^2*log(abs(-b*c/(b*x + a) + a*d/(b*x + a) - d))/(b^4*c^3 - 3*a*b^3*c^2*d + 3*a^2*b^2*c*d^2 - a^3*b*d^3) -
1/2*(b^3*c/(b*x + a)^2 - 2*b^2*d/(b*x + a) - a*b^2*d/(b*x + a)^2)/(b^4*c^2 - 2*a*b^3*c*d + a^2*b^2*d^2)

________________________________________________________________________________________

Mupad [B]
time = 0.69, size = 182, normalized size = 2.22 \begin {gather*} \frac {\frac {3\,a\,d-b\,c}{2\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}+\frac {b\,d\,x}{a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2}}{a^2+2\,a\,b\,x+b^2\,x^2}-\frac {2\,d^2\,\mathrm {atanh}\left (\frac {a^3\,d^3-a^2\,b\,c\,d^2-a\,b^2\,c^2\,d+b^3\,c^3}{{\left (a\,d-b\,c\right )}^3}+\frac {2\,b\,d\,x\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}{{\left (a\,d-b\,c\right )}^3}\right )}{{\left (a\,d-b\,c\right )}^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + b*x)^2*(a*c + x*(a*d + b*c) + b*d*x^2)),x)

[Out]

((3*a*d - b*c)/(2*(a^2*d^2 + b^2*c^2 - 2*a*b*c*d)) + (b*d*x)/(a^2*d^2 + b^2*c^2 - 2*a*b*c*d))/(a^2 + b^2*x^2 +
 2*a*b*x) - (2*d^2*atanh((a^3*d^3 + b^3*c^3 - a*b^2*c^2*d - a^2*b*c*d^2)/(a*d - b*c)^3 + (2*b*d*x*(a^2*d^2 + b
^2*c^2 - 2*a*b*c*d))/(a*d - b*c)^3))/(a*d - b*c)^3

________________________________________________________________________________________